/**
 * Copyright (C) 2013 Christos Koufogiannakis
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *     http://www.apache.org/licenses/LICENSE-2.0
 *     
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.easychart.chart;

import android.graphics.Color;

/**
 * This class defines the drawing parameters of a chart.
 * Each chart has an instance of this class.
 *
 */
public class ChartParameters {
	public class IntParameter {
		private int value;
		IntParameter(int value) {
			this.value = value;
		}
		
		public int getValue() {
			return this.value;
		}
		
		public void setValue(int value) {
			this.value = value;
		}
	}
	
	public class BoolParameter{
		private boolean value;
		
		BoolParameter(boolean value) {
			this.value = value;
		}
		
		public boolean getValue() {
			return this.value;
		}
		
		public void setValue(boolean value) {
			this.value = value;
		}
	};
	
	// the following parameters define the spacing, width, color of titles,
	// axes, legends and so on.
	public IntParameter PLOT_TITLE_TOP_TO_BORDER = new IntParameter(5);
	public IntParameter PLOT_TITLE_BOTTOM_TO_PLOT = new IntParameter(10);
	public IntParameter PLOT_RIGHT_TO_BORDER = new IntParameter(5);
	public IntParameter XTITLE_TOP_TO_XLABEL = new IntParameter(5);
	public IntParameter XTITLE_BOTTOM_TO_BORDER = new IntParameter(5);
	public IntParameter YTITLE_LEFT_TO_BORDER = new IntParameter(7);
	public IntParameter YTITLE_RIGHT_TO_YLABEL = new IntParameter(10);
	public IntParameter XLABEL_TO_PLOT = new IntParameter(8);
	public IntParameter YLABEL_TO_PLOT = new IntParameter(10);
	public IntParameter VERTEX_TO_VERTEX_LABEL = new IntParameter(2);
	public IntParameter MIN_VERTEX_LABEL_TO_PLOT = new IntParameter(1);
	public BoolParameter SHOW_VERTEX_LABELS = new BoolParameter(false);	
	public BoolParameter SHOW_ALL_LABEL_LINES = new BoolParameter(false);
	// LABEL_LINE_LEN <= YLABEL_TO_PLOT and LABEL_LINE_LEN <= XLABEL_TO_PLOT
	public IntParameter LABEL_LINE_LENGTH = new IntParameter(5);		
	public IntParameter LABEL_LINE_STROKE = new IntParameter(0);
	public IntParameter PLOT_BORDER_STROKE = new IntParameter(2);
	
	public IntParameter TITLE_TEXT_COLOR = new IntParameter(Color.WHITE);
	public IntParameter LABEL_TEXT_COLOR = new IntParameter(Color.WHITE);
	public IntParameter VERTEX_LABELS_TEXT_COLOR = new IntParameter(Color.WHITE);
	public IntParameter PLOT_BORDER_COLOR = new IntParameter(Color.GRAY);
	public IntParameter PLOT_BACKGROUND_COLOR = new IntParameter(Color.BLACK);
	public IntParameter BACKGROUND_COLOR = new IntParameter(Color.BLACK);
	
	public BoolParameter SHOW_BOTTOM_PLOT_BORDER = new BoolParameter(true);
	public BoolParameter SHOW_TOP_PLOT_BORDER = new BoolParameter(true);
	public BoolParameter SHOW_LEFT_PLOT_BORDER = new BoolParameter(true);
	public BoolParameter SHOW_RIGHT_PLOT_BORDER = new BoolParameter(true);
	public BoolParameter SHOW_HORIZONTAL_AXIS_AT_ZERO = new BoolParameter(true);
	public BoolParameter SHOW_HORIZONTAL_GRID = new BoolParameter(false);
	public BoolParameter SHOW_VERTICAL_GRID = new BoolParameter(false);
	public IntParameter GRID_LINE_LENGTH = new IntParameter(5);
	
	public BoolParameter SHOW_LEGEND = new BoolParameter(false);
	public IntParameter LEGEND_BOTTOM_TO_BORDER = new IntParameter(6);
	public IntParameter LEGEND_LEFT_TO_BORDER = new IntParameter(30);
	public IntParameter LEGEND_SYMBOL_WIDTH = new IntParameter(3);
	public IntParameter LEGEND_SYMBOL_TO_TEXT = new IntParameter(2);
	public IntParameter LEGEND_SPACE_TO_RIGHT_LABEL = new IntParameter(8);
	public IntParameter LEGEND_SPACE_TO_TOP_LABEL = new IntParameter(4);
	public IntParameter LEGEND_TEXT_COLOR = new IntParameter(Color.WHITE);
		
	// Bar Chart
	public IntParameter BAR_PAD_EACH_SIDE_PERCENT_OF_BARWIDTH = new IntParameter(12);
	public IntParameter BAR_COLOR = new IntParameter(Color.BLUE);
	
	// Box Plot
	public IntParameter BOX_PAD_EACH_SIDE_PERCENT_OF_BARWIDTH = new IntParameter(10);
	public IntParameter BOX_COLOR = new IntParameter(Color.GREEN);
	public IntParameter WHISKER_COLOR = new IntParameter(Color.RED);
	public IntParameter MEDIAN_COLOR = new IntParameter(Color.BLUE);
	public IntParameter MEDIAN_LINE_WIDTH = new IntParameter(3);
	public IntParameter BOX_LINE_WIDTH = new IntParameter(2);
	public IntParameter WHISKER_LINE_WIDTH = new IntParameter(2);
	
	// Line chart
	public IntParameter PLOT_BORDER_TO_POINTS = new IntParameter(10);
	public BoolParameter SHOW_LINE = new BoolParameter(true);
	public IntParameter LINE_WIDTH = new IntParameter(2);
	public BoolParameter SHOW_VERTEX_POINTS = new BoolParameter(true);
	public IntParameter VERTEX_POINT_WIDTH = new IntParameter(3);
	
	// Pie Chart
	public IntParameter BORDER_TO_PIE = new IntParameter(30);
	public BoolParameter SHOW_PIE_LABELS = new BoolParameter(true);
}